package com.wswy.wzcx.utils;

import android.support.annotation.NonNull;

import com.che.libcommon.utils.JsonKit;

import com.wswy.wzcx.utils.Preference.Converter;

/**
 * Created by wangduheng26 on 2018/1/24.
 * wangduheng26@gmail.com
 */

public abstract class SimpleObjConvertAdapter<T> implements Converter<T> {
    @NonNull
    @Override
    public abstract T deserialize(@NonNull String serialized);

    @NonNull
    @Override
    public String serialize(@NonNull T value) {
        return JsonKit.GSON.toJson(value);
    }
}
